<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>属性选择器</title>
	<script type="text/javascript" src='./jquery-3.1.1.js'></script>
</head>
<body>
  	<p>Email:<input type='text' name="email" /></p>
  	<p>password:<input type="password" name="password" /></p>
  	<p>重复密码:<input type="text" name="repassword" /> </p>
  	<p>学号:<input type="text" name="stunum" /> </p>
  	<p>学分:<input type="text" name="stuscore" /> </p>
  	<p>秘密:<input type="password" ass='bbs'/> </p>
	
</body>
<script type="text/javascript">
	//type选择
	$('input[type=password]').css('background','teal');
	//name选择
	$('input[name=stunum]').css('background','brown');
	//name不等于password
	$('input[name!=password]').css('background','palegreen');
	//正则选择器
	$('input[name$=word]').css('background','purple');
	$('input[name^=stu]').css('background','navy');
	$('input[name*=pass]').css('background','black');
	//自定义属性
	$('input[ass=bbs]').css('background','yellow');
	//type的另一种方式
	$('input:password').css('background','lime');
	
</script>
</html>